package net.xdclass.feign;

import net.xdclass.request.LockProductRequest;
import net.xdclass.util.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Classname ProductFeignClient
 * @Description TODO
 * @Date 2022/5/24 15:38
 * @Created by sunhao
 */
@FeignClient(value = "xdclass-product-service")
public interface ProductFeignClient {

  /**
   * 确认订单商品
   * @param productIdList
   * @return
   */
  @PostMapping("/api/cart/v1/confirm_order_cart_item")
  JsonData confirmOrderCartItem(@RequestBody List<Long> productIdList);

  @PostMapping("/api/product/v1/lock_products")
  JsonData lockProductStock(@RequestBody LockProductRequest lockProductRequest);
}
